package in.muton.edushare.processing.objects;

import in.muton.edushare.wicket.models.CayenneList;

import java.util.List;

import com.edushare.common.orm.ORMInterface;
import com.edushare.common.vo.CourseInstances;
import com.edushare.common.vo.Enrolments;
import com.edushare.common.vo.Users;

public class ORMCourseData {
	public static CayenneList<Users> getFaculty(ORMInterface orm, CourseInstances cInst){
		List<Enrolments> eList = cInst.getEnrolmentList();
		CayenneList<Users> userList = new CayenneList<Users>(null);
		for(Enrolments e:eList){
			if(e.getEnrolmentType() == Enrolments.TEACHER)
				userList.add(e.getUser());
		}
		return userList;
	}
	
}
